package com.goldsign.pay.provider.userbase.controller;

import com.goldsign.pay.provider.userbase.service.UserBaseApi;
import com.goldsign.pay.provider.userbase.to.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
public class UserBaseController
{
	private final Logger logger = LoggerFactory.getLogger(this.getClass());

	@Autowired
	private UserBaseApi userbaseApi;

	@RequestMapping(value = "/getUserInfoByMobNo", method = RequestMethod.POST)
	@ResponseBody
	public GetUserInfoRespDTO getUserInfoByMobNo(@RequestBody GetUserInfoReqDTO req)
	{
		GetUserInfoRespDTO getUserInfoRespDTO = userbaseApi.getUserInfoByMobNo(req);
		return getUserInfoRespDTO;
	}

	@RequestMapping(value = "/createUser", method = RequestMethod.POST)
	@ResponseBody
	public CreateUserRespDTO createUser(@RequestBody CreateUserReqDTO req)
	{
		CreateUserRespDTO createUserRespDTO = userbaseApi.createUser(req);
		return createUserRespDTO;
	}

	@RequestMapping(value = "/checkUserLoginPasswd", method = RequestMethod.POST)
	@ResponseBody
	public CheckUserLoginPasswdRespDTO checkUserLoginPasswd(@RequestBody CheckUserLoginPasswdReqDTO req)
	{
		CheckUserLoginPasswdRespDTO checkUserLoginPasswdRespDTO = userbaseApi.checkUserLoginPasswd(req);
		return checkUserLoginPasswdRespDTO;
	}

}
